import java.util.Arrays;

public class maxAndMin {
    public static void main(String[] args) {
        int[] element = new int[10];
        int max = element[0];
        for (int i = 0; i < element.length; i++) {
            int num = (int) (100 * Math.random());
            element[i] = num;
            if (element[i] > max) {
                max = element[i];
            }
        }
        int min = element[0];
        for (int i = 0; i < element.length; i++) {
            if (min > element[i]) {
                min = element[i];
            }
        }
        System.out.println("随机的数组为" + Arrays.toString(element));
        System.out.println("最大值" + max);
        System.out.println("最小值" + min);
    }
}
